
<h2>Frage bearbeiten</h2>


<?php echo validation_errors(); ?>
<?php echo form_open('fragen_controller/validate') ?>
<?php ?>
	<input type="input" name="fragenid" hidden="true" value=<?php echo $fragen['ID'];?> />
	<label for="Fragenart">Fragenart:</label>
	<!-- <select name="Fragenart" />
		<option value="1">MultipleChoice1Antwort</option>
		<option value="2">MultipleChoice2Antworten</option>
		<option value="3">MultipleChoice3Antworten</option>
		<option value="4">Textfrage</option>
	</select><br />	-->
	<select name="Fragenart" />
		<?php foreach ($fragenart as $type){
			if($type['Code'] == $fragen['Fragenart'])
			{
			 echo '<option value='.$type['Code'].' selected="selected">'.$type['Code'].'</option>';
			} else {
				echo '<option value='.$type['Code'].' >'.$type['Code'].'</option>';
			}
		}
		?>
	</select><br />	<br />
	<select name="Fach" />
		<?php foreach ($faecher as $fach){
			if($fach['Code'] == $fragen['Fach'])
			{
			 echo '<option value='.$fach['Code'].' selected="selected">'.$fach['Code'].'</option>';
			} else {
				echo '<option value='.$fach['Code'].' >'.$fach['Code'].'</option>';
			}
		}
		?>
	</select><br />	
	<label for="Frage">Frage:</label>
	<textarea type="input" name="Frage" rows="5" cols="20" /><?php echo $fragen['Frage'];?></textarea> <br />
		<script>
//<![CDATA[
	CKEDITOR.replace( 'Frage',
    {
		language : 'de',
		toolbar : 'Basic',
		toolbarCanCollapse : false,
		resize_enabled : false,
		removePlugins : 'elementspath',
		toolbar_Basic :
		[
			{ name: 'clipboard', items : [ 'PasteText','PasteFromWord','-','Undo','Redo' ] },
			{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
			{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','NumberedList','BulletedList' ] },
			{ name: 'insert', items : [ 'Image','Table','HorizontalRule','SpecialChar','TextColor' ] },
			{ name: 'paragraph', items : ['RemoveFormat','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
			{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }
		]
    });	

//]]>	
</script> 
	<label for="Antwort1">Antwort 1:</label>
	<input type="input" name="Antwort1" value="<?php echo $fragen['Antwort1'];?>"/><br />
	<label for="Antwort2">Antwort 2:</label>
	<input type="input" name="Antwort2" value="<?php echo $fragen['Antwort2'];?>"/><br />
	<label for="Antwort3">Antwort 3:</label>
	<input type="input" name="Antwort3" value="<?php echo $fragen['Antwort3'];?>"/><br />
	<label for="Antwort4">Antwort 4:</label>
	<input type="input" name="Antwort4" value="<?php echo $fragen['Antwort4'];?>"/><br />
	<label for="Antwort5">Antwort 5:</label>
	<input type="input" name="Antwort5" value="<?php echo $fragen['Antwort5'];?>"/><br />
	<label for="Loesung1">Lösung 1:</label>
	<input type="input" name="Loesung1" value="<?php echo $fragen['Loesung1'];?>"/><br />
	<label for="Loesung2">Lösung 2:</label>
	<input type="input" name="Loesung2" value="<?php echo $fragen['Loesung2'];?>"/><br />
	<label for="Loesung3">Lösung 3:</label>
	<input type="input" name="Loesung3" value="<?php echo $fragen['Loesung3'];?>"/><br />	
	<label for="Punkte">Punkte:</label>
	<input type="input" name="Punkte" value="<?php echo $fragen['Punkte'];?>"/><br />

	<input class="art-button" type="submit" name="submit" value="Ändern" />

</form>